package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

/**
 * 日程表
 *
 * @author wb
 */
public class CalendarVO extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 月份名称 */
    private String date;

    /** 日程类型 */
    private String type;

    /** 子菜单 */
    private List<CalendarContent> contentList = new ArrayList<CalendarContent>();

    @NotBlank(message = "月份不能为空")
    @Size(min = 0, max = 7, message = "菜单名称长度不能超过7个字符")
    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<CalendarContent> getContentList() {
        return contentList;
    }

    public void setContentList(List<CalendarContent> contentList) {
        this.contentList = contentList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("monthName", getDate())
            .append("type", getType())
            .append("children", getContentList())
            .toString();
    }

    public CalendarVO() {
    }

    public CalendarVO(String date, String type, List<CalendarContent> contentList) {
        this.date = date;
        this.type = type;
        this.contentList = contentList;
    }
}
